// 图片加载出错指令
export const imgerror = {
  inserted(el, binding) {
    // 当图片加载出错的时候触发
    el.onerror = () => {
      console.log('图片加载出错')
      el.src = binding.value
    }
  },
  componentUpdated(dom, options) {
    dom.src = dom.src || options.value
  }
}
